package com.epam.qanda.db.model;

import java.io.Serializable;
import java.sql.Timestamp;

import com.epam.qanda.db.annotaion.DBFieldName;

public class Answer implements Serializable {

	private static final long serialVersionUID = 1L;
	@DBFieldName("id")
	private Integer id;
	@DBFieldName("question_id")
	private Integer questionId;
	@DBFieldName("user_id")
	private Integer userId;
	@DBFieldName("text")
	private String text;
	@DBFieldName("time")
	private Timestamp time;
	@DBFieldName("likes")
	private Integer likes;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getQuestionId() {
		return questionId;
	}

	public void setQuestionId(Integer questionId) {
		this.questionId = questionId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Integer getLikes() {
		return likes;
	}

	public void setLike(Integer likes) {
		this.likes = likes;
	}

	public Timestamp getTime() {
		return time;
	}

	public void setTime(Timestamp time) {
		this.time = time;
	}

	@Override
	public String toString() {
		return "Answer [id=" + id + ", questionId=" + questionId + ", userId=" + userId + ", text="
				+ text + ", time=" + time + ", likes=" + likes + "]";
	}

}
